# -*- coding: utf-8 -*-

from __future__ import print_function


# Script starts from here

class PypixContextManagerDemo:

    def __enter__(self):
        print('Entering the block')

    def __exit__(self, *unused):
        print('Exiting the block')


demo = PypixContextManagerDemo()
with demo:
    print('In the block')


def foo():
    with PypixContextManagerDemo() as demo:
        return 1


print(foo())
